GtkSidebar: Don't use internal API
authorMatthias Clasen <mclasen@redhat.com>
Fri, 3 Oct 2014 02:01:14 +0000 (22:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Oct 2014 02:01:14 +0000 (22:01 -0400)
This makes it possible to copy the gtksidebar.c source into
other projects, for early adopters.

gtk/gtksidebar.c

index 707694a2e086c5f5c585ead50e180cd730fe2ec2..437f69281fe4d1641ca79a2414dc2ba9a0fc8e8e 100644 (file)
@@ -192,8 +192,7 @@ gtk_sidebar_init (GtkSidebar *sidebar)
                                   GTK_POLICY_NEVER,
                                   GTK_POLICY_AUTOMATIC);
 
-  _gtk_bin_set_child (GTK_BIN (sidebar), sw);
-  gtk_widget_set_parent (sw, GTK_WIDGET (sidebar));
+  gtk_container_add (GTK_CONTAINER (sidebar), sw);
 
   priv->list = GTK_LIST_BOX (gtk_list_box_new ());
   gtk_widget_show (GTK_WIDGET (priv->list));